
{% if site.gitalk.enable %}  
    {% if site.gitalk.distractionFreeMode %}
      <link rel='stylesheet' href="https://unpkg.com/gitalk@latest/dist/gitalk.css">
      <script src="https://unpkg.com/gitalk@latest/dist/gitalk.min.js"></script>
      <div id="gitalk-container"></div>
      <script type="text/javascript">
          var gitalk = new Gitalk({
            clientID: '{{site.gitalk.clientID}}', 
            clientSecret: '{{site.gitalk.clientSecret}}',
            repo: '{{site.gitalk.repo}}', 
            owner: '{{site.gitalk.owner}}', 
            admin: ['{{site.gitalk.admin}}'], 
            distractionFreeMode: '{{site.gitalk.distractionFreeMode}}',
            id: '{{ page.url }}',
          })
          gitalk.render('gitalk-container')
      </script>
    {% endif %}
{% endif %}

